﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.SqlClient;
using System.Data;

namespace QLKH
{
    class ListBUS
    {
        private ListDAO listDAO;
        public ListBUS()
        {
            listDAO = new ListDAO();
        }

        public List<ListVO> GetList()
        {
             List<ListVO> list=new List<ListVO>();
             DataTable dt = listDAO.GetList();
             foreach (DataRow dr in dt.Rows)
             {
                 ListVO listVO = new ListVO();
                 listVO.Ma = dr["MAKH"].ToString();
                 listVO.Ten = dr["TENKH"].ToString();
                 listVO.DiaChi = dr["DIACHI"].ToString();
                 listVO.DienThoai = dr["DIENTHOAI"].ToString();
                 list.Add(listVO);
             }
             return list;
        }
    }
}
